<?php
/** .-------------------------------------------------------------------
* |  Software: [HDCMS framework]
* |      Site: www.hdcms.com
* |-------------------------------------------------------------------
* |    Author: 向军 <2300071698@qq.com>
* |    WeChat: aihoudun
* | Copyright (c) 2012-2019, www.houdunwang.com. All Rights Reserved.
* '-------------------------------------------------------------------*/

namespace app\home\controller;


class Personal extends Common{
    //动作
    public function index(){
    //此处书写代码...

        $Data=Db::table('goods')
                ->join('order_list','goods.gid','=','order_list.gid')
                ->join('orders','order_list.oid','=','orders.oid')
                ->get();
//        p($Data);die;
        View::with('Data',$Data);
        return view();
    }
    //删除
    public function del(){
         $oid=Q('get.oid');
        $Order_list=new \system\model\Order_list();
        $Order_list->where("oid",$oid)->delete();

        $order=new \system\model\Order();
        $order->where('oid',$oid)->delete();
        message('删除成功',u('personal.index'),'success');

    }
}
